// 你封装的工具库

/*export function say(msg) {
 console.log(msg)
 }*/
import Config from './config.js';
const fxcrmTools = {
    goBack: function () {
        history.go(-1);
    },
    goHome: function () {
        window.location.href = Config.homeUrl;
    },
    getUrlKey: function (name) {
        return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.href) || [, ""])[1].replace(/\+/g, '%20')) || null;
    },
    goHref: function (url, pId, navId, other) {
        if (other) {
            window.location.href = url + '?pId=' + pId + '&navId=' + navId + "&" + other;
        } else {
            window.location.href = url + '?pId=' + pId + '&navId=' + navId;
        }
    }
};
export default fxcrmTools;